/**══════════════════════════════════╗
*作    者：songbaobao                                                 ║
*职    业：我以我血荐轩辕                                              ║
*CSND地址：https://blog.csdn.net/weixin_43949535                       ║
**GitHub ：https://github.com/TsinghuaLucky912/My_own_C-_study_and_blog║
**GitEE  ：https://gitee.com/lucky912_admin/code-up_-pat               ║
*═══════════════════════════════════╣
*创建时间：                                                           
*功能描述：                                                            
*                                                                      
*                                                                      
*═══════════════════════════════════╣
*结束时间:                                                           
*═══════════════════════════════════╝
//                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
//            __.'              ~.   .~              `.__
//          .'//              西南\./联大               \\`.
//        .'//                     |                     \\`.
//      .'// .-~"""""""~~~~-._     |     _,-~~~~"""""""~-. \\`.
//    .'//.-"                 `-.  |  .-'                 "-.\\`.
//  .'//______.============-..   \ | /   ..-============.______\\`.
//.'______________________________\|/______________________________`.
*/
#include <iostream>
#include <vector>
#include <string.h>
#include <unordered_map>
#include <ctype.h>
#include <queue>
#include <list>
#include <map>
#include <math.h>
#include <algorithm>
#include <iomanip>
using namespace std;


int main()
{
	int n, N;
	int myarray[201] = { 0 };
	while (EOF != scanf("%d", &n))
	{
		int x;
		for (int i = 0; i < n; ++i)
		{
			scanf("%d", myarray + i);
		}
		scanf("%d", &x);
		
		/*
		sort(myarray, myarray + n);

		int low = 0, high = n, mid;
		while (low <= high)
		{
			mid = (high - low) / 2 + low;
			if (x == myarray[mid])
			{
				printf("%d\n", mid);
				break;
			}
			else if (x < myarray[mid])
			{
				high = mid;
			}
			else
				low = mid;
		} */

		int i = 0;
		for (; i < n; ++i)
		{
			if (myarray[i] == x)
			{
				printf("%d\n", i);
				break;
			}
		}
		if (i == n)
		{
			printf("%d\n", -1);
		}
		memset(myarray, 0, 201 * sizeof(int));
	}
	
	return 0;
}
/**
*备用注释：
*
*
*
*/
